Skip to content

feat: batch sell quote details and final review modal#30157

Draft
infiniteflower wants to merge 8 commits into
swaps-4439-batchSell-quotes-2from
swaps-4439-batchSell-quotes-3
Draft

feat: batch sell quote details and final review modal#30157
infiniteflower wants to merge 8 commits into
swaps-4439-batchSell-quotes-2from
swaps-4439-batchSell-quotes-3

Conversation

@infiniteflower
Copy link
Copy Markdown
Contributor

@infiniteflower infiniteflower commented May 13, 2026

Description

Adds the next Batch Sell review flow: the final review, and supporting info modals.

This introduces reusable quote-detail UI, skeleton states for quote-dependent values, modal-to-modal replacement behavior for bottom sheets, and Redux state for Batch Sell destination tokens and per-token slippage. The final review modal now supports collapsible token quote details, minimum received and network fee explanations, and placeholder quote values while quote fetching is still being wired.

Changelog

CHANGELOG entry: Added Batch Sell review controls, quote detail modals, and final review flow

Related issues

Related: SWAPS-4439

Manual testing steps

Feature: Batch Sell quote review flow

  Scenario: user reviews selected Batch Sell tokens before submitting
    Given MM_BATCH_SELL_ENABLED is true
    And swaps are active
    And the wallet has eligible non-stablecoin tokens on a supported Batch Sell network

    When user opens Batch Sell
    And user selects multiple eligible tokens from the same network
    And user taps Continue
    Then the Batch Sell Review screen is displayed
    And each selected token has a percentage slider
    And the destination stablecoin pill is displayed

    When user taps the Total received info icon
    Then the quote details modal is displayed
    And token quote rows, Total received, and Minimum received are shown

  Scenario: user opens explanatory modals from quote review
    Given user is viewing quote details or final review

    When user taps the Minimum received info icon
    Then the Minimum received info modal is displayed
    And tapping Back returns to the source modal

    When user taps the Network fee info icon from final review
    Then the Network fee info modal is displayed
    And tapping Back returns to the final review modal

  Scenario: user opens final review
    Given user is on the Batch Sell Review screen

    When user taps Review
    Then the Batch Sell final review modal is displayed
    And the You sell section shows selected token avatars and token count

    When user taps the You sell row
    Then token quote rows collapse
    And Total received and Minimum received remain visible

Screenshots/Recordings

Before

N/A

After

Screen.Recording.2026-05-15.at.11.24.48.AM.mov

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbotv2 metamaskbotv2 Bot added the team-swaps-and-bridge Swaps and Bridge team label May 13, 2026
@infiniteflower infiniteflower changed the title feat: (1st commit) quote details modal ui only feat: batch sell quote details and final review modal May 14, 2026
@github-actions github-actions Bot added size-XL and removed size-L labels May 14, 2026
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-2 branch from 554f2ae to 13c94fd Compare May 15, 2026 17:46
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-3 branch from 4791df6 to a9b5221 Compare May 15, 2026 17:48
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-2 branch from 6182d23 to b54c57f Compare May 15, 2026 20:36
@infiniteflower infiniteflower force-pushed the swaps-4439-batchSell-quotes-3 branch from a9b5221 to 14991d2 Compare May 15, 2026 20:50
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeSwap, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR introduces new BatchSell modal components (BatchSellQuoteDetailsModal, BatchSellFinalReviewModal, BatchSellNetworkFeeInfoModal, BatchSellMinimumReceivedInfoModal) and wires them into the Bridge/Swap navigation stack. Key changes:

  1. BatchSellReview.tsx: HAS_QUOTES changed from false to true, enabling the Review button and wiring up navigation to the new final review modal. This is a functional change that activates the batch sell review flow.
  2. New modal components: 4 new bottom sheet modals added to the Bridge modal stack for the batch sell review flow.
  3. Routes.ts + NavigationService/types.ts: New route constants and type definitions added (purely additive, no breaking changes to existing routes).
  4. SlippageModal/utils.ts: Function renamed from getBatchSellInitialSlippage to getBatchSellSlippage and new getSlippageDisplayValue helper added.
  5. locales/en.json: New i18n strings for batch sell UI.

The changes are scoped to the Bridge/Swap feature area. No existing E2E tests specifically cover BatchSell flows, but SmokeSwap covers bridge/swap functionality broadly. Per tag descriptions, SmokeSwap should be paired with SmokeConfirmations since swap flows involve transaction confirmations.

The NavigationService/types.ts change is purely additive (new type imports and route params added to RootStackParamList) and does not affect existing navigation routes, so it does not warrant broader test coverage beyond the swap/bridge area.

No performance tests are needed as these are UI modal additions without significant rendering performance implications.

Performance Test Selection:
The changes add new modal components to the BatchSell flow within Bridge/Swap. These are UI additions (bottom sheets/modals) that don't involve heavy list rendering, account/network selectors, or app initialization changes that would meaningfully impact performance metrics. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant